﻿using System;
using System.Linq;
using System.Text;
using Catalog.Enumerations;

namespace Catalog.CatalogItems
{
    public class Film : RentableItem
    {
        public Film(string name, FilmGenre genre, string coverArt, DateTime releaseDate, bool isInStock)
        {
            this.Name = name;
            this.Genre = genre;
            this.CoverArt = coverArt;
            this.ReleaseDate = releaseDate;
            this.IsInStock = isInStock;
        }

        public FilmGenre Genre { get; set; }

        public override string ToString()
        {
            StringBuilder result = new StringBuilder();

            result.AppendFormat("{0}: {1}, Genre: {2}, Cover: {3}, Piblication date: {4:dd.MM.yyyy} [{5}]",
                this.GetType().Name, this.Name, this.Genre, this.CoverArt, this.ReleaseDate, this.IsInStock ? "IN-STOCK" : "OUT-OF-STOCK");

            return result.ToString();
        }
    }
}